Optimal. Leaf size=103 \[ \frac {a^3 \log (\cosh (c+d x))}{d}-\frac {3 a^2 b \text {sech}^2(c+d x)}{2 d}-\frac {3 a b^2 \text {sech}^4(c+d x)}{4 d}-\frac {b^3 \text {sech}^6(c+d x)}{6 d}+\frac {\left (b+a \cosh ^2(c+d x)\right )^4 \text {sech}^8(c+d x)}{8 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {4223, 457, 79,
45} \begin {gather*} \frac {a^3 \log (\cosh (c+d x))}{d}-\frac {3 a^2 b \text {sech}^2(c+d x)}{2 d}-\frac {3 a b^2 \text {sech}^4(c+d x)}{4 d}+\frac {\text {sech}^8(c+d x) \left (a \cosh ^2(c+d x)+b\right )^4}{8 b d}-\frac {b^3 \text {sech}^6(c+d x)}{6 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 79
Rule 457
Rule 4223
Rubi steps
\begin {align*} \int \left (a+b \text {sech}^2(c+d x)\right )^3 \tanh ^3(c+d x) \, dx &=-\frac {\text {Subst}\left (\int \frac {\left (1-x^2\right ) \left (b+a x^2\right )^3}{x^9} \, dx,x,\cosh (c+d x)\right )}{d}\\ &=-\frac {\text {Subst}\left (\int \frac {(1-x) (b+a x)^3}{x^5} \, dx,x,\cosh ^2(c+d x)\right )}{2 d}\\ &=\frac {\left (b+a \cosh ^2(c+d x)\right )^4 \text {sech}^8(c+d x)}{8 b d}+\frac {\text {Subst}\left (\int \frac {(b+a x)^3}{x^4} \, dx,x,\cosh ^2(c+d x)\right )}{2 d}\\ &=\frac {\left (b+a \cosh ^2(c+d x)\right )^4 \text {sech}^8(c+d x)}{8 b d}+\frac {\text {Subst}\left (\int \left (\frac {b^3}{x^4}+\frac {3 a b^2}{x^3}+\frac {3 a^2 b}{x^2}+\frac {a^3}{x}\right ) \, dx,x,\cosh ^2(c+d x)\right )}{2 d}\\ &=\frac {a^3 \log (\cosh (c+d x))}{d}-\frac {3 a^2 b \text {sech}^2(c+d x)}{2 d}-\frac {3 a b^2 \text {sech}^4(c+d x)}{4 d}-\frac {b^3 \text {sech}^6(c+d x)}{6 d}+\frac {\left (b+a \cosh ^2(c+d x)\right )^4 \text {sech}^8(c+d x)}{8 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.51, size = 128, normalized size = 1.24 \begin {gather*} \frac {\cosh ^6(c+d x) \left (a+b \text {sech}^2(c+d x)\right )^3 \left (24 a^3 \log (\cosh (c+d x))+12 a^2 (a-3 b) \text {sech}^2(c+d x)+18 a (a-b) b \text {sech}^4(c+d x)+4 (3 a-b) b^2 \text {sech}^6(c+d x)+3 b^3 \text {sech}^8(c+d x)\right )}{3 d (a+2 b+a \cosh (2 c+2 d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.72, size = 131, normalized size = 1.27
method | result | size |
derivativedivides | \(\frac {a^{3} \left (\ln \left (\cosh \left (d x +c \right )\right )-\frac {\left (\tanh ^{2}\left (d x +c \right )\right )}{2}\right )+3 a^{2} b \left (-\frac {\sinh ^{2}\left (d x +c \right )}{2 \cosh \left (d x +c \right )^{4}}-\frac {1}{4 \cosh \left (d x +c \right )^{4}}\right )+3 a \,b^{2} \left (-\frac {\sinh ^{2}\left (d x +c \right )}{4 \cosh \left (d x +c \right )^{6}}-\frac {1}{12 \cosh \left (d x +c \right )^{6}}\right )+b^{3} \left (-\frac {\sinh ^{2}\left (d x +c \right )}{6 \cosh \left (d x +c \right )^{8}}-\frac {1}{24 \cosh \left (d x +c \right )^{8}}\right )}{d}\) | \(131\) |
default | \(\frac {a^{3} \left (\ln \left (\cosh \left (d x +c \right )\right )-\frac {\left (\tanh ^{2}\left (d x +c \right )\right )}{2}\right )+3 a^{2} b \left (-\frac {\sinh ^{2}\left (d x +c \right )}{2 \cosh \left (d x +c \right )^{4}}-\frac {1}{4 \cosh \left (d x +c \right )^{4}}\right )+3 a \,b^{2} \left (-\frac {\sinh ^{2}\left (d x +c \right )}{4 \cosh \left (d x +c \right )^{6}}-\frac {1}{12 \cosh \left (d x +c \right )^{6}}\right )+b^{3} \left (-\frac {\sinh ^{2}\left (d x +c \right )}{6 \cosh \left (d x +c \right )^{8}}-\frac {1}{24 \cosh \left (d x +c \right )^{8}}\right )}{d}\) | \(131\) |
risch | \(-a^{3} x -\frac {2 a^{3} c}{d}+\frac {2 \,{\mathrm e}^{2 d x +2 c} \left (3 a^{3} {\mathrm e}^{12 d x +12 c}-9 a^{2} b \,{\mathrm e}^{12 d x +12 c}+18 a^{3} {\mathrm e}^{10 d x +10 c}-36 a^{2} b \,{\mathrm e}^{10 d x +10 c}-18 a \,b^{2} {\mathrm e}^{10 d x +10 c}+45 a^{3} {\mathrm e}^{8 d x +8 c}-63 a^{2} b \,{\mathrm e}^{8 d x +8 c}-24 a \,b^{2} {\mathrm e}^{8 d x +8 c}-16 b^{3} {\mathrm e}^{8 d x +8 c}+60 a^{3} {\mathrm e}^{6 d x +6 c}-72 a^{2} b \,{\mathrm e}^{6 d x +6 c}-12 a \,b^{2} {\mathrm e}^{6 d x +6 c}+16 b^{3} {\mathrm e}^{6 d x +6 c}+45 a^{3} {\mathrm e}^{4 d x +4 c}-63 a^{2} b \,{\mathrm e}^{4 d x +4 c}-24 a \,b^{2} {\mathrm e}^{4 d x +4 c}-16 b^{3} {\mathrm e}^{4 d x +4 c}+18 a^{3} {\mathrm e}^{2 d x +2 c}-36 a^{2} b \,{\mathrm e}^{2 d x +2 c}-18 a \,b^{2} {\mathrm e}^{2 d x +2 c}+3 a^{3}-9 a^{2} b \right )}{3 d \left (1+{\mathrm e}^{2 d x +2 c}\right )^{8}}+\frac {a^{3} \ln \left (1+{\mathrm e}^{2 d x +2 c}\right )}{d}\) | \(366\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 652 vs.
\(2 (95) = 190\).
time = 0.48, size = 652, normalized size = 6.33 \begin {gather*} \frac {3 \, a^{2} b \tanh \left (d x + c\right )^{4}}{4 \, d} + a^{3} {\left (x + \frac {c}{d} + \frac {\log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{d} + \frac {2 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d {\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + 1\right )}}\right )} - 4 \, a b^{2} {\left (\frac {3 \, e^{\left (-4 \, d x - 4 \, c\right )}}{d {\left (6 \, e^{\left (-2 \, d x - 2 \, c\right )} + 15 \, e^{\left (-4 \, d x - 4 \, c\right )} + 20 \, e^{\left (-6 \, d x - 6 \, c\right )} + 15 \, e^{\left (-8 \, d x - 8 \, c\right )} + 6 \, e^{\left (-10 \, d x - 10 \, c\right )} + e^{\left (-12 \, d x - 12 \, c\right )} + 1\right )}} - \frac {2 \, e^{\left (-6 \, d x - 6 \, c\right )}}{d {\left (6 \, e^{\left (-2 \, d x - 2 \, c\right )} + 15 \, e^{\left (-4 \, d x - 4 \, c\right )} + 20 \, e^{\left (-6 \, d x - 6 \, c\right )} + 15 \, e^{\left (-8 \, d x - 8 \, c\right )} + 6 \, e^{\left (-10 \, d x - 10 \, c\right )} + e^{\left (-12 \, d x - 12 \, c\right )} + 1\right )}} + \frac {3 \, e^{\left (-8 \, d x - 8 \, c\right )}}{d {\left (6 \, e^{\left (-2 \, d x - 2 \, c\right )} + 15 \, e^{\left (-4 \, d x - 4 \, c\right )} + 20 \, e^{\left (-6 \, d x - 6 \, c\right )} + 15 \, e^{\left (-8 \, d x - 8 \, c\right )} + 6 \, e^{\left (-10 \, d x - 10 \, c\right )} + e^{\left (-12 \, d x - 12 \, c\right )} + 1\right )}}\right )} - \frac {32}{3} \, b^{3} {\left (\frac {e^{\left (-6 \, d x - 6 \, c\right )}}{d {\left (8 \, e^{\left (-2 \, d x - 2 \, c\right )} + 28 \, e^{\left (-4 \, d x - 4 \, c\right )} + 56 \, e^{\left (-6 \, d x - 6 \, c\right )} + 70 \, e^{\left (-8 \, d x - 8 \, c\right )} + 56 \, e^{\left (-10 \, d x - 10 \, c\right )} + 28 \, e^{\left (-12 \, d x - 12 \, c\right )} + 8 \, e^{\left (-14 \, d x - 14 \, c\right )} + e^{\left (-16 \, d x - 16 \, c\right )} + 1\right )}} - \frac {e^{\left (-8 \, d x - 8 \, c\right )}}{d {\left (8 \, e^{\left (-2 \, d x - 2 \, c\right )} + 28 \, e^{\left (-4 \, d x - 4 \, c\right )} + 56 \, e^{\left (-6 \, d x - 6 \, c\right )} + 70 \, e^{\left (-8 \, d x - 8 \, c\right )} + 56 \, e^{\left (-10 \, d x - 10 \, c\right )} + 28 \, e^{\left (-12 \, d x - 12 \, c\right )} + 8 \, e^{\left (-14 \, d x - 14 \, c\right )} + e^{\left (-16 \, d x - 16 \, c\right )} + 1\right )}} + \frac {e^{\left (-10 \, d x - 10 \, c\right )}}{d {\left (8 \, e^{\left (-2 \, d x - 2 \, c\right )} + 28 \, e^{\left (-4 \, d x - 4 \, c\right )} + 56 \, e^{\left (-6 \, d x - 6 \, c\right )} + 70 \, e^{\left (-8 \, d x - 8 \, c\right )} + 56 \, e^{\left (-10 \, d x - 10 \, c\right )} + 28 \, e^{\left (-12 \, d x - 12 \, c\right )} + 8 \, e^{\left (-14 \, d x - 14 \, c\right )} + e^{\left (-16 \, d x - 16 \, c\right )} + 1\right )}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 4658 vs.
\(2 (95) = 190\).
time = 0.43, size = 4658, normalized size = 45.22 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 1.72, size = 178, normalized size = 1.73 \begin {gather*} \begin {cases} a^{3} x - \frac {a^{3} \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} - \frac {a^{3} \tanh ^{2}{\left (c + d x \right )}}{2 d} - \frac {3 a^{2} b \tanh ^{2}{\left (c + d x \right )} \operatorname {sech}^{2}{\left (c + d x \right )}}{4 d} - \frac {3 a^{2} b \operatorname {sech}^{2}{\left (c + d x \right )}}{4 d} - \frac {a b^{2} \tanh ^{2}{\left (c + d x \right )} \operatorname {sech}^{4}{\left (c + d x \right )}}{2 d} - \frac {a b^{2} \operatorname {sech}^{4}{\left (c + d x \right )}}{4 d} - \frac {b^{3} \tanh ^{2}{\left (c + d x \right )} \operatorname {sech}^{6}{\left (c + d x \right )}}{8 d} - \frac {b^{3} \operatorname {sech}^{6}{\left (c + d x \right )}}{24 d} & \text {for}\: d \neq 0 \\x \left (a + b \operatorname {sech}^{2}{\left (c \right )}\right )^{3} \tanh ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 387 vs.
\(2 (95) = 190\).
time = 0.48, size = 387, normalized size = 3.76 \begin {gather*} -\frac {840 \, {\left (d x + c\right )} a^{3} - 840 \, a^{3} \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right ) + \frac {2283 \, a^{3} e^{\left (16 \, d x + 16 \, c\right )} + 16584 \, a^{3} e^{\left (14 \, d x + 14 \, c\right )} + 5040 \, a^{2} b e^{\left (14 \, d x + 14 \, c\right )} + 53844 \, a^{3} e^{\left (12 \, d x + 12 \, c\right )} + 20160 \, a^{2} b e^{\left (12 \, d x + 12 \, c\right )} + 10080 \, a b^{2} e^{\left (12 \, d x + 12 \, c\right )} + 102648 \, a^{3} e^{\left (10 \, d x + 10 \, c\right )} + 35280 \, a^{2} b e^{\left (10 \, d x + 10 \, c\right )} + 13440 \, a b^{2} e^{\left (10 \, d x + 10 \, c\right )} + 8960 \, b^{3} e^{\left (10 \, d x + 10 \, c\right )} + 126210 \, a^{3} e^{\left (8 \, d x + 8 \, c\right )} + 40320 \, a^{2} b e^{\left (8 \, d x + 8 \, c\right )} + 6720 \, a b^{2} e^{\left (8 \, d x + 8 \, c\right )} - 8960 \, b^{3} e^{\left (8 \, d x + 8 \, c\right )} + 102648 \, a^{3} e^{\left (6 \, d x + 6 \, c\right )} + 35280 \, a^{2} b e^{\left (6 \, d x + 6 \, c\right )} + 13440 \, a b^{2} e^{\left (6 \, d x + 6 \, c\right )} + 8960 \, b^{3} e^{\left (6 \, d x + 6 \, c\right )} + 53844 \, a^{3} e^{\left (4 \, d x + 4 \, c\right )} + 20160 \, a^{2} b e^{\left (4 \, d x + 4 \, c\right )} + 10080 \, a b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 16584 \, a^{3} e^{\left (2 \, d x + 2 \, c\right )} + 5040 \, a^{2} b e^{\left (2 \, d x + 2 \, c\right )} + 2283 \, a^{3}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{8}}}{840 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.64, size = 573, normalized size = 5.56 \begin {gather*} \frac {32\,\left (3\,a\,b^2-5\,b^3\right )}{d\,\left (5\,{\mathrm {e}}^{2\,c+2\,d\,x}+10\,{\mathrm {e}}^{4\,c+4\,d\,x}+10\,{\mathrm {e}}^{6\,c+6\,d\,x}+5\,{\mathrm {e}}^{8\,c+8\,d\,x}+{\mathrm {e}}^{10\,c+10\,d\,x}+1\right )}-a^3\,x-\frac {128\,b^3}{d\,\left (7\,{\mathrm {e}}^{2\,c+2\,d\,x}+21\,{\mathrm {e}}^{4\,c+4\,d\,x}+35\,{\mathrm {e}}^{6\,c+6\,d\,x}+35\,{\mathrm {e}}^{8\,c+8\,d\,x}+21\,{\mathrm {e}}^{10\,c+10\,d\,x}+7\,{\mathrm {e}}^{12\,c+12\,d\,x}+{\mathrm {e}}^{14\,c+14\,d\,x}+1\right )}-\frac {32\,\left (3\,a\,b^2-19\,b^3\right )}{3\,d\,\left (6\,{\mathrm {e}}^{2\,c+2\,d\,x}+15\,{\mathrm {e}}^{4\,c+4\,d\,x}+20\,{\mathrm {e}}^{6\,c+6\,d\,x}+15\,{\mathrm {e}}^{8\,c+8\,d\,x}+6\,{\mathrm {e}}^{10\,c+10\,d\,x}+{\mathrm {e}}^{12\,c+12\,d\,x}+1\right )}+\frac {32\,b^3}{d\,\left (8\,{\mathrm {e}}^{2\,c+2\,d\,x}+28\,{\mathrm {e}}^{4\,c+4\,d\,x}+56\,{\mathrm {e}}^{6\,c+6\,d\,x}+70\,{\mathrm {e}}^{8\,c+8\,d\,x}+56\,{\mathrm {e}}^{10\,c+10\,d\,x}+28\,{\mathrm {e}}^{12\,c+12\,d\,x}+8\,{\mathrm {e}}^{14\,c+14\,d\,x}+{\mathrm {e}}^{16\,c+16\,d\,x}+1\right )}-\frac {8\,\left (9\,a^2\,b-21\,a\,b^2+4\,b^3\right )}{3\,d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )}+\frac {4\,\left (3\,a^2\,b-27\,a\,b^2+16\,b^3\right )}{d\,\left (4\,{\mathrm {e}}^{2\,c+2\,d\,x}+6\,{\mathrm {e}}^{4\,c+4\,d\,x}+4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1\right )}-\frac {2\,\left (3\,a^2\,b-a^3\right )}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}+\frac {a^3\,\ln \left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+1\right )}{d}-\frac {2\,\left (a^3-9\,a^2\,b+6\,a\,b^2\right )}{d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________